package com.beiding.v2.test.pg;

import com.beiding.v2.base.IContext;
import com.beiding.v2.base.IUnit;
import com.beiding.v2.base.IUnitHandler;
import com.beiding.v2.element.ISymbol;

public class SymbolHandler implements IUnitHandler<ISymbol> {

    @Override
    public boolean canHandle(IUnit unit) {
        return unit instanceof ISymbol;
    }

    @Override
    public String handle(IContext context, ISymbol unit) {
        return unit.getSymbolType().getText();
    }
}
